<?php

namespace App\Trip\Plane\Interfaces;

use App\Trip\Plane\Interfaces\Result\Abstracts\AbstractFlightItem;
use App\Trip\Plane\Interfaces\Result\Abstracts\AbstractFlightQueryOneResult;
use App\Trip\Plane\Interfaces\Result\Abstracts\AbstractFlightQueryResult;
use App\Trip\Plane\Interfaces\Result\ChangeFlightInfoInterface;
use App\Trip\Plane\Requests\PriceCalendarRequest;
use App\Trip\Plane\Requests\RulesRequest;
use App\Trip\Plane\Requests\TicketPriceRequest;
use App\Trip\Plane\Requests\TicketQueryRequest;
use App\Trip\Plane\Resp\PriceCalendarResponse;
use App\Trip\Plane\Resp\RulesResponse;

interface PlaneQueryInterface
{
    /**
     * 机票查询
     * @return mixed
     */
    public function ticket_query(TicketQueryRequest $request): AbstractFlightQueryResult;

    /**
     * 报价查询
     * @return mixed
     */
    public function ticket_price(TicketPriceRequest $request): AbstractFlightQueryOneResult;

    /**
     * 价格日历
     */
    public function price_calendar(PriceCalendarRequest $request): PriceCalendarResponse;

    /**
     *  行李、退改规则
     */
    public function rules(RulesRequest $request): RulesResponse;

    /**
     * 解析航班 通过 bookKey
     * @param string $bookKey
     * @return AbstractFlightItem
     */
    public function parseFlightItem(string $bookKey): AbstractFlightItem;

    /**
     * 解析改签航班 通过 change_key
     * @param string $change_key
     * @return ChangeFlightInfoInterface
     */
    public function getChangeSeatItem(string $change_key): ChangeFlightInfoInterface;
}